package com.north.light.libpermission.api;

import android.app.Activity;
import android.content.Context;

import androidx.fragment.app.Fragment;

import java.util.List;

/**
 * author:li
 * date:2022/8/20
 * desc:
 */
public interface PermissionImplApi {


    /**
     * 判断是否拥有权限
     */
    public boolean isGrant(Context context, String permission);

    public boolean isGrant(Context context, String[] permission);

    public boolean isGrant(Context context, List<String> permission);


    /**
     * 请求权限
     */
    public void requestPermission(Activity activity, String[] permission,
                                  int type, boolean enterSetting, PermissionCallback callback);

    public void requestPermission(Activity activity, List<String> permission,
                                  int type, boolean enterSetting, PermissionCallback callback);

    public void requestPermission(Fragment fragment, String[] permission,
                                  int type, boolean enterSetting, PermissionCallback callback);

    public void requestPermission(Fragment fragment, List<String> permission,
                                  int type, boolean enterSetting, PermissionCallback callback);

    public void requestPermission(android.app.Fragment fragment, String[] permission,
                                  int type, boolean enterSetting, PermissionCallback callback);

    public void requestPermission(android.app.Fragment fragment, List<String> permission,
                                  int type, boolean enterSetting, PermissionCallback callback);
}
